<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/global/global-head.jsp" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <title>吉车惠后台管理系统</title>
    <%@include file="/global/global-other.jsp" %>

    <script type="text/javascript">
        var $bn_mobile_application_push_notice_list = new Object();
        var $bn_mobile_application_push_notice_list_Datagrid;
        var $bn_mobile_application_push_notice_list_toolbar = [{
                text:'<i class="fa fa-search" aria-hidden="true"></i>刷新',
                handler:function(){
                    $bn_mobile_application_push_notice_list.reload();
                }
            }
        ];
        $(function(){
            //gird 初始化
            $bn_mobile_application_push_notice_list_Datagrid = $('#bn_mobile_application_push_notice_list_Datagrid').datagrid({
                filterBtnIconCls:'icon-filter',
                queryParams: {
                    filter_EQ_delete_status : 0,
                    filter_EQ_push_type : "NOTICE"
                },
                pageSize : 20,
                remoteFilter:true
            });

        });

        //刷新
        $bn_mobile_application_push_notice_list.reload = function(){
            $bn_mobile_application_push_notice_list_Datagrid.datagrid('reload');
        };

    </script>
</head>
<body>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'center',border:false">
        <table id="bn_mobile_application_push_notice_list_Datagrid"  style="width:100%;height:100%"
               data-options="border:false,rownumbers:true,autoRowHeight:false,singleSelect:true,pagination:true,sortName:'createAt',sortOrder:'desc',toolbar:$bn_mobile_application_push_notice_list_toolbar,rowStyler: function(index,row){return {style:'height:30px'};},url:'${ctx}/mobile/application/push/notice/search?_m=load',method:'post'">
            <thead>
           <tr>
                <th data-options="field:'messageId',width:80,align:'center'">消息ID</th>
                <th data-options="field:'appName',width:100,align:'center'">应用名称</th>
                <th data-options="field:'title',width:150,align:'center'">标题</th>
                <th data-options="field:'content',width:200,align:'center'">内容</th>
                <th data-options="field:'pushClassify',width:80,align:'center',formatter:
                    function(value,row,index){
                        return row.pushClassifyName+'通知';
                    }
                ">推送分类</th>
                <th data-options="field:'systemType',width:80,align:'center'">目标设备</th>
                <th data-options="field:'pushSetting',width:80,align:'center',formatter:
                    function(value,row,index){
                        if(row.pushSetting=='PRODUCT'){
                            return '生产环境';
                        }else if(row.pushSetting=='DEV'){
                            return '开发环境';
                        }
                    }
                ">推送环境</th>
                <th data-options="field:'sendWay',width:80,align:'center',formatter:
                    function(value,row,index){
                        if(row.sendWay=='1'){
                            return '立即发送';
                        }else if(row.sendWay=='2'){
                            return '定时发送';
                        }
                    }
                ">发送方式</th>
                <th data-options="field:'offlineSave',width:80,align:'center',formatter:
                    function(value,row,index){
                        if(row.offlineSave=='2'){
                            return '不保存';
                        }else if(row.offlineSave=='1'){
                            return '保存';
                        }
                    }
                ">离线保存</th>
                <th data-options="field:'isSendSystemMessage',width:80,align:'center',formatter:
                    function(value,row,index){
                        if(row.isSendSystemMessage=='1'){
                            return '是';
                        }else if(row.isSendSystemMessage=='2'){
                            return '否';
                        }
                    }
                ">是否发送<br/>系统消息</th>
                <th data-options="field:'pushStatus',width:80,align:'center',formatter:
                    function(value,row,index){
                        if(row.pushStatus=='0'){
                            return '未知';
                        }else if(row.pushStatus=='1'){
                            return '<span style=\'color:green\'>成功</span>';
                        }else if(row.pushStatus=='2'){
                            return '<span style=\'color:red\'>失败</span>';
                        }
                    }
                ">推送状态</th>
                <th data-options="field:'createAt',width:150,align:'center'">发送时间</th>
                <th data-options="field:'t',width:20,align:'center'"></th>
            </tr>
            </thead>
        </table>
    </div>
</div>
</body>
</html>